<!DOCTYPE html>
<html lang="zh">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>学习助手</title>
    <link rel="stylesheet" type="text/css" href="./bootstrap/css/bootstrap.min.css">

    <link rel="stylesheet" type="text/css" href="./css/style.css">
    <link rel="icon" href="./img/logo.png" type="image/png">
</head>
<style>
    .title_label {
        left: 18px;
        top: 0px;
        height: 29px;
        color: rgba(255, 255, 255, 1);
        font-size: 20px;
        text-align: left;
        font-family: PingFangSC-bold;
    }

    .header_main {
        width: 100%;
        margin: auto;
        background-image: url(./img/head_bg.png);
        background-position: top -140px right 0px;
        height: auto;
        padding: 10px;
        background-size: cover;
        background-size: 100%;
        background-repeat: no-repeat;
        color: dimgray;

    }


    .menuStyle>li {
        float: left;
        margin-left: 10px;
        color: #0e5407;
        font-size: 16px;
        font-weight: 700;
    }

    .workStyle>li {
        float: left;
        margin-left: 10px;
        color: #fff;
        font-weight: 700;
    }

    #infoDiv {
        margin-top: 50px;
        font-size: medium;
    }

    #infoDiv>label {
        margin-top: 10px;
    }

    #pswdInputForm>label {
        margin-top: 20px;
    }
</style>

<body id="mainAPP" class="header_main">
    <header id="home">

        <ul class="workStyle">
            <li>
                <!-- 今日，参数是当前时间往后退1天，所以参数天1 -->
                <button class="btn btn-success" onclick="window.location.href='/home.html'">个人信息 </button>

            </li>
            <li>
                <!-- 今日，参数是当前时间往后退1天，所以参数天1 -->
                <button class="btn btn-warning" onclick="window.location.href='/records.html'">加分记录 </button>

            </li>
            <li>
                <!-- 7天，参数是当前时间往后退7天，所以参数填7 -->
                <button class="btn btn-secondary" onclick="window.location.href='/fill.html'">填写加分 </button>
            </li>
        </ul>

    </header>
    <!-- 为 图表设置的 DOM -->
    <!-- 列出所选日期内有工作量的设备 -->


    <form id="infoDiv">

    </form>
    <button class="btn-sm btn-primary" onclick="updatePswd()" data-bs-toggle="modal"
        style="position: absolute; bottom: 100px;" data-bs-target="#exampleModal"> 修改密码 </button>
    <div class="modal" id="exampleModal" tabindex="-1">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">修改密码</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <form class="modal-body" id="pswdInputForm">
                    <label for="oldPswdInput">原来密码:</label>
                    <input type="password" id="oldPswdInput"> <br>
                    <label for="newPswdInput">新的密码:</label>
                    <input type="password" id="newPswdInput"><br>
                    <label for="rePswdInput">确认密码:</label>
                    <input type="password" id="rePswdInput">
                </form>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" onclick="savePswd() "
                        data-bs-dismiss="modal">确定修改</button>
                </div>
            </div>
        </div>
    </div>
    <div style="position:absolute; bottom: 0px;left: 0; width: 100%;   background-color: #17ad74; " id="bottomBox">
        <div style="color: white; text-align: center;" id="userinfo">信息工程学院</div>
    </div>
    <script type="text/javascript" src="./js/md5.js"></script>
    <script src="./bootstrap/js/bootstrap.min.js"></script> 
    
 

</body>

<script>
    getUserInfo()
    function getUserInfo() {
        let userinfo = localStorage.getItem("userinfo");
        userinfo = JSON.parse(userinfo);
        let divstr = "<div> 姓名:"+userinfo.Name +" </div>"
        divstr += "<div> 性别:"+userinfo.Sex +" </div>"
        divstr += "<div> 学号:"+userinfo.Sn +" </div>"
        divstr += "<div> 密码:"+userinfo.Pswd +" </div>"
        divstr += "<div> 状态:"+userinfo.Status +" </div>"
        divstr += "<div> 班级:"+userinfo.Classname +" </div>"
        document.getElementById("infoDiv").innerHTML = divstr;
    }

</script>

</html>